<template>
  <el-container>
    <el-aside width="auto">
      <Menu :collapse="state"></Menu>
    </el-aside>
    <el-container>
      <el-header>
        <Head @click="state = !state" :state="state"></Head>
      </el-header>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Menu from "./menu";
import Head from "./header";

export default {
  data() {
    return {
      state: false
    };
  },
  components: {
    Menu,
    Head
  }
};
</script>

<style lang="sass">
.el-container,
.el-aside
  height: 100%
.el-header
  padding: 7px
  display: flex
  align-items: center
.el-main
  padding: 0
</style>
<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>